home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / Sample Editors⁄Viewers / Text Editor / Source / TextEditorTransferExt.xh < prev    next >
Encoding:
Text File  |  1995-12-13  |  4.0 KB  |  162 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: Delta Quadrant:Source:OD:SampleCode:SOMTextEditor:Source:TextEditorTransferExt.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Classes defined in this interface
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_TextEditorTransferExt_xh
  18. #define SOM_TextEditorTransferExt_xh
  19.  
  20. class TextEditorTransferExt;
  21.  
  22. #define TextEditorTransferExt_MajorVersion 1
  23. #define TextEditorTransferExt_MinorVersion 0
  24.  
  25. /* C++ SOM defs */
  26. #include <somcls.xh>
  27. #include <somcm.xh>
  28.  
  29. /* C++ parent defs */
  30. #ifndef SOM_TextTransferExt_xh
  31. #include <TextTransferExt.xh>
  32. #endif
  33.  
  34. #ifndef TextEditorTransferExt_API
  35. #define TextEditorTransferExt_API
  36. /*
  37.  * -- The Class API
  38.  */
  39.  
  40. /*
  41.  * Start of user-defined types:
  42.  */
  43. class SOMClass;
  44. class SOMObject;
  45. class ODFrame;
  46. class ODFacet;
  47. class ODObject;
  48. class ODExtension;
  49. class ODRefCntObject;
  50. class ODPart;
  51. class ODPlatformTypeList;
  52. #define kDataTransferExtension "Apple Computer:Extension:DataTransfer"
  53. #define kTextTransferExtension "Apple Computer:Extension:TextTransfer"
  54. class TextEditorTransferExt;
  55.  
  56. /*
  57.  * End of user-defined types.
  58.  */
  59.  
  60. #ifdef OLDIBMSOMAPISUPPORT
  61. #define TextEditorTransferExtCClassData TextEditorTransferExtClassData
  62. #define TextEditorTransferExtNewClass(major,minor) somNewVersionedClassReference(TextEditorTransferExt,major,minor)
  63. #endif
  64.  
  65. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  66. #define TextEditorTransferExtMetaClass SOMClass
  67.  
  68.  
  69. /* The API to the TextEditorTransferExt class object, and the methods it introduces. */
  70. SOMEXTERN struct TextEditorTransferExtClassDataStructure {
  71. #ifdef OLDIBMSOMAPISUPPORT
  72.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  73. #else
  74.     long zero;
  75. #endif
  76.     somStaticClassInfo *sci;
  77.     somDToken        instanceDataToken;
  78.     long reserved [3];
  79.     somMToken InitTextEditorTransferExt;
  80. } SOMDLINK TextEditorTransferExtClassData;
  81.  
  82. #if !defined(TextEditorTransferExt_Class_Source) && !defined(SOM_Module_texteditortransferext_Source)
  83. #if PRAGMA_IMPORT_SUPPORTED
  84. #pragma import list TextEditorTransferExtClassData
  85. #endif
  86. #endif
  87.  
  88.  
  89. /*
  90.  * -- Typedefs and inline method declarations for left path inherited methods
  91.  * -- are omitted because this compilation had -museinheritedmethods in effect
  92.  */
  93.  
  94.  
  95. /*
  96.  * -- Typedefs for TextEditorTransferExt Method Procedures
  97.  */
  98. SOMEXTERN {
  99. typedef void   (* SOMLINK somTD_TextEditorTransferExt_InitTextEditorTransferExt)(TextEditorTransferExt *somSelf, Environment *ev,
  100.         ODPart* owner);
  101. }
  102.  
  103. #endif /* TextEditorTransferExt_API */
  104.  
  105.  
  106. /*
  107.  * -- This emitter treats Method Tokens as Thunks by default.
  108.  * -- Use the sc modifier "nothunks" to change this default
  109.  */
  110. #undef somresolve_
  111. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  112.  
  113. /*
  114.  * -- The C++ Wrapper Class for TextEditorTransferExt
  115.  */
  116. class TextEditorTransferExt : public TextTransferExt
  117. {
  118. public:
  119.  
  120. // TextEditorTransferExt::new registers use of the class object, and then uses somNew
  121. // to allocate memory and load the object method table pointer. 
  122. void *operator new(size_t size)
  123. {
  124.     SOM_IgnoreWarning(size);
  125.     // Allocate memory using the default allocator for TextEditorTransferExt, and
  126.     // clear mem & set method table pointer, call basic initialization
  127. #ifdef SOMCHKNULL
  128.     void * __somResult = (void *)
  129.       somNewObject(TextEditorTransferExt);
  130.     SOMCHKNULL(__somResult);
  131.     return __somResult;
  132. #else
  133.     return (void*) somNewObject(TextEditorTransferExt);
  134. #endif
  135. }
  136.  
  137. // TextEditorTransferExt::delete uses the default deallocator for the object's class.
  138. void operator delete(void * obj)
  139. {
  140.     if (obj) {
  141.         SOM_Resolve(obj,SOMObject,somFree)
  142.            ( (SOMObject*) obj );
  143.     }
  144. }
  145.  
  146. /* method: InitTextEditorTransferExt */
  147. void   InitTextEditorTransferExt(Environment *ev,
  148.         ODPart* owner)
  149. {
  150.    SOM_ResolveD(this,TextEditorTransferExt,TextEditorTransferExt,InitTextEditorTransferExt)
  151.     (this,ev,owner);
  152. #ifdef SOMCHKEXCEPT
  153.       SOMCHKEXCEPT;
  154. #endif
  155. }
  156.  
  157. };   /* TextEditorTransferExt */
  158.  
  159.  
  160.  
  161. #endif       /* SOM_TextEditorTransferExt_xh */
  162.